﻿using System;
using System.Collections.Generic;
using System.Text;

namespace DotNetExtensions.Core.FileTransfers
{
    public class MutipleFormValue
    {
        public string FileName { get; set; }
        public byte[] Content { get; set; }
        public long ContentLength
        {
            get
            {
                return Content == null ? 0 : Content.Length;
            }
        }
        public bool IsUseChunkUpload { get; set; }
        public int Index { get; set; } = 1;
        public int Total { get; set; } = 1;

        public bool Completed
        {
            get
            {
                return Index == Total;
            }
        }
    }

    public class MutipleFormValue<T> : MutipleFormValue
    {
        public T ExtraData { get; set; }
    }
}
